<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        class User {
            show() {
                console.log('user show.....')
            }
        }
        class Admin extends User {
            show() {
                // super 访问父类
                super.show();
                console.log('admin show......')
            }
        }
        let admin = new Admin();
        admin.show();

        let a = {
            name:"a.name",
            show() {
                console.log(this.name)
            }
        }
        let b = {
            name:'b.name',
            __proto__: a, // 对象的继承 b=>a
            show() {
                console.log(this.name)
                this.__proto__.show.call(this);// 使用call改变this 指向调用者
            }
        }
        
        console.log(b.name)
        
    </script>
</body>

</html>